import { NgModule }              from '@angular/core';
import { RouterModule, Routes }  from '@angular/router';
import {DashBoardComponent} from "./dash-board/dash-board.component";
import {HostListComponent} from "./host/host-list.component";
import {MessageComponent} from "./message/message.component";
import {LoginComponent} from "./login/login.component";
import {RegisterComponent} from "./register/register.component";

const appRoutes: Routes = [
  { path: 'trip', component: DashBoardComponent },
  { path: 'hosts', component: HostListComponent },
  { path: 'login', component: LoginComponent },
  { path: 'register', component: RegisterComponent },
  { path: '',   redirectTo: '/trip', pathMatch: 'full' }
];

@NgModule({
  imports: [
    RouterModule.forRoot(
      appRoutes,
      { enableTracing: false } // <-- debugging purposes only
    )
  ],
  exports: [
    RouterModule
  ]
})
export class AppRoutingModule {}
